{include file="public:header" /}
<!--图片水印设置-->
<div class="pad_lr_10">
<div class="col_tab">
	<ul class="J_tabs tab_but cu_li">
		<li class="current">水印设置</li>
	</ul>
<div class="J_panes">
	<div class="content_list pad_10">
	<form id="info_form" action="{:url('Setting/addDo')}" method="post" enctype="multipart/form-data">
	<table width="100%" class="table_form">
        <tr>
            <th width="150">开启水印 :</th>
            <td>
                <label class="mr10"><input name="data[is_warter]" value="1" type="radio" class="J_change_status"> 开启 </label>
                <label><input name="data[is_warter]" type="radio" value="0" class="J_change_status" checked>关闭</label>
            </td>
        </tr>
        <tr>
            <th width="150">水印类型 :</th>
            <td>
                <label class="mr10"><input type="radio" name="data[water_type]" value="1" class="J_change_status"> 图片</label>
                <label><input type="radio" name="data[water_type]" value="2" class="J_change_status" checked> 文字</label>
            </td>
        </tr>
		<tr>
            <th>水印图片 :</th>
            <td>
                <input type="text" name="data[water_img]" id="J_img" class="input-text fl mr10" value="" size="40"/>
                &nbsp;&nbsp; <div id="J_upload_img" class="upload_btn"><span>上传</span></div>
			</td>
        </tr>

		<tr>
            <th>水印文字 :</th>
            <td><input type="text" name="data[water_text]" class="input-text" value="" size="40" /></td>
        </tr>
		<tr>
            <th>水印透明度 :</th>
            <td><input type="text" name="data[water_alpha]" class="input-text" value="80" size="30" /></td>
        </tr>
		<tr>
            <th>水印文字旋转角度 :</th>
            <td><input type="text" name="data[water_angle]" class="input-text" value="0" size="30" /></td>
        </tr>
		<tr>
            <th>水印文字大小 :</th>
            <td><input type="text" name="data[water_size]" class="input-text" value="12" size="30" /></td>
        </tr>
				<tr>
            <th>水印文字颜色 :</th>
            <td><input type="text" name="data[water_color]" id="J_color" class="input-text" value="#ffffff" size="30" />&nbsp;<a href="javascript:;" class="color_picker_btn"><img class="J_color_picker" data-it="J_title" data-ic="J_color" src="__IMG__/color.png"></a></td>
        </tr>
		<tr>
            <th>水印位置 :</th>
            <td>
			<table width="300" border="0">
			  <tr>
					<td><label><input name="data[water_pos]" type="radio" value="1"/>顶部居左</label></td>
					<td><label><input name="data[water_pos]" type="radio" value="2"/>顶部居中</label></td>
					<td><label><input name="data[water_pos]" type="radio" value="3"/>顶部居右</label></td>
				  </tr>
				  <tr>
					<td><label><input name="data[water_pos]" type="radio" value="4"/>左边居中</label></td>
					<td><label><input name="data[water_pos]" type="radio" value="5"/>图片中心</label></td>
					<td><label><input name="data[water_pos]" type="radio" value="6"/>右边居中</label></td>
				  </tr>
				  <tr>
					<td><label><input name="data[water_pos]" type="radio" value="7"/>底部居左</label></td>
					<td><label><input name="data[water_pos]" type="radio" value="8"/>底部居中</label></td>
					<td><label><input name="data[water_pos]" type="radio" value="9" checked />底部居右</label></td>
				  </tr>
			</table>
			</td>
        </tr>
        <tr>
        	<th></th>
        	<td>
				<input type="hidden" name="name" value="{$action_name}">
                <input type="submit" class="btn btn_submit" value="提交"/>
            </td>
    	</tr>
	</table>
	</form>
		</div>
</div>
</div>
</div>
{include file="public:footer" /}
<script src="__PUBLIC__/js/plugins/colorpicker.js"></script>
<script src="__PUBLIC__/js/plugins/fileuploader.js"></script>
<script type="text/javascript">
	$(function(){
		$('.J_color_picker').colorpicker();
		//上传图片
		var img_uploader = new qq.FileUploaderBasic({
			allowedExtensions: ['jpg','gif','jpeg','png'],
			button: document.getElementById('J_upload_img'),
			multiple: false,
			action: "{:url('Setting/ajaxUploadImg')}",
			inputName: 'img',
			forceMultipart: true, //用$_FILES
			showMessage: function(message){
				$.yingloujie.tip({content:message, icon:'error'});
			},
			onSubmit: function(id, fileName){
				$('#J_upload_img').addClass('btn_disabled').find('span').text('上传中...');
			},
			onComplete: function(id, fileName, result){
				$('#J_upload_img').removeClass('btn_disabled').find('span').text('上传');
				if(result.status == '1'){
					$('#J_img').val(result.data);
				} else {
					$.yingloujie.tip({content:result.msg, icon:'error'});
				}
			}
		});
	});

</script>
</body>
</html>